﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace BlockeyEssentials.Drawing
{
    public class SpriteR : Sprite
    {
        public SpriteR(Texture2D oTexture, Rectangle oRectangle)
            : base(oTexture)
        {
            Texture = oTexture;
            _Rectangle = oRectangle;
        }

        #region Methods

        public override void Draw(SpriteBatch oSB, float oTransition)
        {
            oSB.Draw(Texture,
                Rectangle,
                Source,
                Color * oTransition,
                Rotation,
                Origin,
                Effect,
                LayerOrder);
        }

        public void Move(int oHorizontal, int oVertical)
        {
            _Rectangle.Y += oVertical;
            _Rectangle.X += oHorizontal;
        }

        #endregion

        #region Properties

        public Rectangle Rectangle
        {
            get { return _Rectangle; }
            set { _Rectangle = value; }
        }

        public int X
        {
            get { return _Rectangle.X; }
            set { _Rectangle.X = value; }
        }

        public int Y
        {
            get { return _Rectangle.Y; }
            set { _Rectangle.Y = value; }
        }

        public int Width
        {
            get { return _Rectangle.Width; }
            set { _Rectangle.Width = value; }
        }

        public int Height
        {
            get { return _Rectangle.Height; }
            set { _Rectangle.Height = value; }
        }

        #endregion

        Rectangle _Rectangle;

    }
}
